package com.mjk.common.tools.scheduled;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
@Data
@Builder
public class DynamicScheduledModel implements Serializable{
	
	
	private String id;
	
	private String cron;
	
	private String type;//任务类型
	
	private boolean isValid;
	
	private String taskInstance;//任务实列
	
	private String taskMethod;//任务方法
	
	private String taskParams;//任务参数
	
	private transient Object ext;//透传参数
	
	private String asyn;//异步
	
	public boolean isChange(DynamicScheduledModel oldModel) {
			return !this.cron.equals(oldModel.cron) || this.isValid != oldModel.isValid || !this.id.equals(oldModel.id);
	}
	
	
}
